package com.xnyzc.lhy.common.penum.wallet;

/**
 * @Description 是否显示额度
 * @Author Bin
 * @Date 2019/8/1 17:54
 **/
public enum EIsDepartmentMoneyDisplayType {

    yes(0,"是"),
    no(1, "否");

    private Integer type;
    private String value;

    EIsDepartmentMoneyDisplayType(Integer type, String value){
        this.type = type;
        this.value = value;
    }

    public static EIsDepartmentMoneyDisplayType findById(Integer type){
        EIsDepartmentMoneyDisplayType eIsDepartmentMoneyDisplay;
        switch (type){
            case 0:
                eIsDepartmentMoneyDisplay  = EIsDepartmentMoneyDisplayType.yes;
                break;
            case 1:
                eIsDepartmentMoneyDisplay = EIsDepartmentMoneyDisplayType.no;
                break;
            default:
                throw new IllegalArgumentException("非法type");
        }
        return eIsDepartmentMoneyDisplay;
    }

    public String getValue(){
        return this.value;
    }

    public Integer getType() {
        return this.type;
    }
}
